// 抽离组建计算的通用逻辑，方便导入到每个页面中
import store from "../../store";
import {mapActions, mapState} from "vuex";
import appConfig from "../../../api/appConfig";

export default {
    computed: {
        ...mapState('app', ['winSize'])
    },
    watch: {
        winSize(newVal, oldVal){
            this.calLoginGroupInfo()
        }
    },
    mounted() {
      this.calLoginGroupInfo()
    },
    data(){
        return {
            loginGroupInfo: {
                width: 0,
            }
        }
    },
    methods: {
        calLoginGroupInfo(){
            let width = this.winSize.width * 0.85
            if (width > 360) width = 360
            this.loginGroupInfo.width = width
        }
    }
}

